import { get } from "../mock";

import request from "@/utils/request";
import { AxiosPromise } from "axios";
import {
  teacherComForms,
  teacherComQuery,
  teacherComPageVO,
  teacherComPageResult,
} from "./types";

/**
 * 获取分页数据
 *
 * @param queryParams
 */
export function getteacherComPage(
  queryParams?: teacherComQuery
): AxiosPromise<teacherComPageResult> {
  return request({
    url: "/api/work/workPage",
    method: "get",
    params: queryParams,
  });
}

/**
 * 获取ID集合
 *
 * @param queryParams
 */
export function getteacherComMenuIds(id: string): AxiosPromise<string[]> {
  return request({
    url: "/api/work/find",
    method: "get",
  });
}

/**
 * 添加
 *
 * @param data
 */
export function addteacherCom(data: teacherComForms) {
  return request({
    url: "/api/work/add",
    method: "post",
    params: data,
  });
}

/**
 * 获取用户ID集合
 *
 * @param queryParams
 */
export function getUserIds(ids: string): AxiosPromise<number[]> {
  return request({
    url: "/api/sys/user/info",
    method: "get",
  });
}
